package com.example.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionTemplate;

/**
 * @program: demo
 * @description:
 * @author: 陈恩涛
 * @create: 2023-06-17 21:49
 **/

@Service
public class TransactionService2 {

    @Autowired
    private TransactionTemplate transactionTemplate;

    public String doProgrammaticTransaction() {
        return transactionTemplate.getIsolationLevel() +  " \t" + transactionTemplate.getPropagationBehavior();
    }

}
